#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_lineEdit_textEdited(const QString &arg1)
{
    if(ui->lineEdit->text().isEmpty()&&ui->lineEdit_2->text().isEmpty())
        ui->label_3->setText("两次密码为空");
    else if(ui->lineEdit->text()==ui->lineEdit_2->text())
        ui->label_3->setText("两次密码相同");
    else
        ui->label_3->setText("两次密码不同");
}

void Widget::on_lineEdit_2_textEdited(const QString &arg1)
{
    if(ui->lineEdit->text().isEmpty()&&ui->lineEdit_2->text().isEmpty())
        ui->label_3->setText("两次密码为空");
    else if(ui->lineEdit->text()==ui->lineEdit_2->text())
        ui->label_3->setText("两次密码相同");
    else
        ui->label_3->setText("两次密码不同");
}
